<?php

function rpc( $json_request ) {
    global $PARAPARA;

    $req_param = $json_request->param;

    if(!$req_param) {
        return new RPC_Error($json_request->operation, "PARAM", "No params");
    };

    $forum = $PARAPARA->get_forum( '*' );

    $rpc_retval = 
        array( 
            'html' => $forum->as_html( array( 'expanded' => false ) )
            );

    return new RPC_Response( $json_request->operation, $rpc_retval );


}

return rpc( $json_request );


?>